import request from '@/utils/request'

const bChannelApi = {
    ChannelPage: 'b/gameTaskChannel/page',
    saveChannel: 'b/gameTaskChannel/save',
    deleteChannel: 'b/gameTaskChannel/remove',
    createQrCode: 'b/gameTaskChannel/getChannelQrCode'
}

export function createChannelQrCode (parameter) {
    return request({
        url: bChannelApi.createQrCode,
        method: 'get',
        params: parameter
    })
}

export function deleteChannel (parameter) {
    return request({
        url: bChannelApi.deleteChannel,
        method: 'get',
        hideError: true,
        params: parameter
    })
}

export function saveChannel (parameter) {
    return request({
        url: bChannelApi.saveChannel,
        method: 'POST',
        hideError: true,
        data: parameter
    })
}

export function ChannelPage (parameter) {
    return request({
        url: bChannelApi.ChannelPage,
        method: 'get',
        params: parameter
    })
}

export default {
    deleteChannel,
    saveChannel,
    ChannelPage,
    createChannelQrCode

}
